package com.charlotte.study.gupao.vistor.kpi;

import java.util.ArrayList;
import java.util.List;

/**
 * @author junjie.ding
 * @date 2020/3/25
 */
public class BusinessReport {

    private List<Employee> employeeList = new ArrayList<>();

    public BusinessReport() {
        employeeList.add(new Engineer("工程师-A"));
        employeeList.add(new Engineer("工程师-B"));
        employeeList.add(new Engineer("工程师-c"));
        employeeList.add(new Engineer("工程师-D"));
        employeeList.add(new Manager("项目经理-A"));
        employeeList.add(new Manager("产品经理-A"));
    }


    /**
     * 为访问者展示报表
     * @param visitor 公司高层，CEO或CTO之类
     */
    public void showReport(IVisitor visitor){
        for (Employee employee : employeeList) {
            employee.accept(visitor);
        }
    }
}
